<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun: b2FreeList Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classb2_free_list-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">b2FreeList Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="b2_free_list_8h_source.html">b2FreeList.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afc9008396402ba77a2e5f62580bbba45"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc9008396402ba77a2e5f62580bbba45"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#afc9008396402ba77a2e5f62580bbba45">b2FreeList</a> ()</td></tr>
<tr class="memdesc:afc9008396402ba77a2e5f62580bbba45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct the free list. <br/></td></tr>
<tr class="separator:afc9008396402ba77a2e5f62580bbba45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80eb1a4823b06dfb416edb8d62b4990f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80eb1a4823b06dfb416edb8d62b4990f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#a80eb1a4823b06dfb416edb8d62b4990f">~b2FreeList</a> ()</td></tr>
<tr class="memdesc:a80eb1a4823b06dfb416edb8d62b4990f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the free list. <br/></td></tr>
<tr class="separator:a80eb1a4823b06dfb416edb8d62b4990f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1e8c4f276273754005e150c93f18075"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1e8c4f276273754005e150c93f18075"></a>
<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#ad1e8c4f276273754005e150c93f18075">Allocate</a> ()</td></tr>
<tr class="memdesc:ad1e8c4f276273754005e150c93f18075"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate an item from the freelist. <br/></td></tr>
<tr class="separator:ad1e8c4f276273754005e150c93f18075"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b6651e8d43db966b1d0dfb182ab0082"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b6651e8d43db966b1d0dfb182ab0082"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#a1b6651e8d43db966b1d0dfb182ab0082">Free</a> (<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *node)</td></tr>
<tr class="memdesc:a1b6651e8d43db966b1d0dfb182ab0082"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free an item from the freelist. <br/></td></tr>
<tr class="separator:a1b6651e8d43db966b1d0dfb182ab0082"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8068b95c06caf411cdb7180029c8ec2a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#a8068b95c06caf411cdb7180029c8ec2a">AddToFreeList</a> (<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *node)</td></tr>
<tr class="separator:a8068b95c06caf411cdb7180029c8ec2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acac7647f48cb979eb38b0a26753afb96"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acac7647f48cb979eb38b0a26753afb96"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#acac7647f48cb979eb38b0a26753afb96">RemoveAll</a> ()</td></tr>
<tr class="memdesc:acac7647f48cb979eb38b0a26753afb96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all items (allocated and free) from the freelist. <br/></td></tr>
<tr class="separator:acac7647f48cb979eb38b0a26753afb96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5d8d94c1b996534f8cd4bff99c9f36a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af5d8d94c1b996534f8cd4bff99c9f36a"></a>
const <a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#af5d8d94c1b996534f8cd4bff99c9f36a">GetAllocatedList</a> () const </td></tr>
<tr class="memdesc:af5d8d94c1b996534f8cd4bff99c9f36a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the list which tracks allocated items. <br/></td></tr>
<tr class="separator:af5d8d94c1b996534f8cd4bff99c9f36a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16db7ec783c322f8eb2bd19c1cd70df7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16db7ec783c322f8eb2bd19c1cd70df7"></a>
const <a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#a16db7ec783c322f8eb2bd19c1cd70df7">GetFreeList</a> () const </td></tr>
<tr class="memdesc:a16db7ec783c322f8eb2bd19c1cd70df7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the list which tracks free items. <br/></td></tr>
<tr class="separator:a16db7ec783c322f8eb2bd19c1cd70df7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ae7ae518220bcf257bca24022e9ff7cb9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7ae518220bcf257bca24022e9ff7cb9"></a>
<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#ae7ae518220bcf257bca24022e9ff7cb9">m_allocated</a></td></tr>
<tr class="memdesc:ae7ae518220bcf257bca24022e9ff7cb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of allocated items. <br/></td></tr>
<tr class="separator:ae7ae518220bcf257bca24022e9ff7cb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07d0c02fb373cce85874f824506ce0d5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07d0c02fb373cce85874f824506ce0d5"></a>
<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_free_list.html#a07d0c02fb373cce85874f824506ce0d5">m_free</a></td></tr>
<tr class="memdesc:a07d0c02fb373cce85874f824506ce0d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of free items. <br/></td></tr>
<tr class="separator:a07d0c02fb373cce85874f824506ce0d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Fast - O(1) - list based allocator for items that can be inserted into <a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> lists. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a8068b95c06caf411cdb7180029c8ec2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2FreeList::AddToFreeList </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add an item to the freelist so that it can be allocated using <a class="el" href="classb2_free_list.html#ad1e8c4f276273754005e150c93f18075" title="Allocate an item from the freelist. ">b2FreeList::Allocate()</a>. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="b2_free_list_8h_source.html">b2FreeList.h</a></li>
<li>b2FreeList.cpp</li>
</ul>
</div><!-- contents -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
